<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateContratoObraTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateContratoObraLabel_idContrato}" for="idContrato" />
                    <h:inputText id="idContrato" value="#{contratoObraController.selected.idContrato}" title="#{bundle.CreateContratoObraTitle_idContrato}" required="true" requiredMessage="#{bundle.CreateContratoObraRequiredMessage_idContrato}"/>
                    <h:outputLabel value="#{bundle.CreateContratoObraLabel_duracaoTempo}" for="duracaoTempo" />
                    <h:inputText id="duracaoTempo" value="#{contratoObraController.selected.duracaoTempo}" title="#{bundle.CreateContratoObraTitle_duracaoTempo}" required="true" requiredMessage="#{bundle.CreateContratoObraRequiredMessage_duracaoTempo}"/>
                    <h:outputLabel value="#{bundle.CreateContratoObraLabel_duracaoTipo}" for="duracaoTipo" />
                    <h:inputText id="duracaoTipo" value="#{contratoObraController.selected.duracaoTipo}" title="#{bundle.CreateContratoObraTitle_duracaoTipo}" required="true" requiredMessage="#{bundle.CreateContratoObraRequiredMessage_duracaoTipo}"/>
                    <h:outputLabel value="#{bundle.CreateContratoObraLabel_valorTotal}" for="valorTotal" />
                    <h:inputText id="valorTotal" value="#{contratoObraController.selected.valorTotal}" title="#{bundle.CreateContratoObraTitle_valorTotal}" required="true" requiredMessage="#{bundle.CreateContratoObraRequiredMessage_valorTotal}"/>
                    <h:outputLabel value="#{bundle.CreateContratoObraLabel_detalhes}" for="detalhes" />
                    <h:inputText id="detalhes" value="#{contratoObraController.selected.detalhes}" title="#{bundle.CreateContratoObraTitle_detalhes}" />
                    <h:outputLabel value="#{bundle.CreateContratoObraLabel_fkCliente}" for="fkCliente" />
                    <h:selectOneMenu id="fkCliente" value="#{contratoObraController.selected.fkCliente}" title="#{bundle.CreateContratoObraTitle_fkCliente}" required="true" requiredMessage="#{bundle.CreateContratoObraRequiredMessage_fkCliente}">
                        <f:selectItems value="#{clienteController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateContratoObraLabel_fkObra}" for="fkObra" />
                    <h:selectOneMenu id="fkObra" value="#{contratoObraController.selected.fkObra}" title="#{bundle.CreateContratoObraTitle_fkObra}" required="true" requiredMessage="#{bundle.CreateContratoObraRequiredMessage_fkObra}">
                        <f:selectItems value="#{projetoController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{bundle.CreateContratoObraLabel_dataContrato}" for="dataContrato" />
                    <h:inputText id="dataContrato" value="#{contratoObraController.selected.dataContrato}" title="#{bundle.CreateContratoObraTitle_dataContrato}" required="true" requiredMessage="#{bundle.CreateContratoObraRequiredMessage_dataContrato}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{contratoObraController.create}" value="#{bundle.CreateContratoObraSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{contratoObraController.prepareList}" value="#{bundle.CreateContratoObraShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateContratoObraIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
